package net.dopan.pigframe.demo.service.impl;

import net.dopan.pigframe.core.base.service.impl.BaseServiceImpl;
import net.dopan.pigframe.demo.mapper.UserActivityTimeMapper;
import net.dopan.pigframe.demo.model.entity.UserActivityTime;
import net.dopan.pigframe.demo.service.UserActivityTimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(rollbackFor = RuntimeException.class)
public class UserActivityTimeServiceImpl extends BaseServiceImpl<UserActivityTimeMapper, UserActivityTime> implements UserActivityTimeService {

    @Autowired
    private UserActivityTimeMapper userActivityTimeMapper;

    @Override
    public Boolean addUserActivityTime(UserActivityTime userActivityTime) {
        userActivityTimeMapper.insert(userActivityTime);
        return true;
    }

    @Override
    public Integer delUserActivityTime(String activityId) {
        return userActivityTimeMapper.delUserActivityTime(activityId);
    }
}
